<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="Web, Dojo, Special Problem" />
        <meta name="description" content="A web-based UML diagramming tool" />
		<meta name="author" content="Robenie D. Fernandez; Rodolfo N. Duldulao, Jr." />
        <title>Create an Account - UML WebStudio</title>
		<link rel="stylesheet" type="text/css" href="lib/dojo/resources/dojo.css" />
		<link rel="stylesheet" type="text/css" href="lib/dijit/themes/soria/soria.css" />
		<link rel="stylesheet" type="text/css" href="lib/dojox/widget/Calendar/Calendar.css" />
		
        <link rel="stylesheet" type="text/css" href="lib/grids-min.css" />
		<link rel="stylesheet" type="text/css" href="lib/reset.css" />
		<link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
		<style type="text/css">
			label{
				font-weight:bold;
			}
		</style>
    </head>
    <body class="soria">
        <p><br/></p>
        <div id="doc4" class="yui-t7">
            <div id="hd">
                <table style="width:100%">
                    <tr>
                        <td>
                            <img src="images/logo3.png" alt="logo"/>
                        </td>
                        <td>
                            <h3 style="background-color:#C3D9FF;padding:5px;">UML WebStudio</h3>
                        </td>
                    </tr>
                </table>
                <br/>
            </div>
            <div id="bd">
				<p>If you already have a UWS Account, you can <a href="index.php">sign in here</a>.</p>
				<br />
				<p style="color:red;text-align:center">
					<?php if(isset($_GET["message"])) echo $_GET["message"] ?>
				</p>
				<form id="form" action="signup_submit.php" dojoType="dijit.form.Form" method="post" onsubmit="return this.validate()">
					<div style="border: solid 3px #CBDCED;padding:10px;">
						<h2 style="color:#3366CC">Create an Account</h2>
						<br />
						<p>To get started with UML WebStudio, create an account first.</p>
						<br /><br />
						<table style="width:100%">
							<tr>
								<td>
									<label for="username">Username</label>
								</td>
								<td>
									<input type="text" id="username" name="username" dojoType="dijit.form.ValidationTextBox" required="true" />
								</td>
							</tr>
							<tr>
								<td>
									<label for="password">Password</label>
								</td>
								<td>
									<div dojoType="dojox.form.PasswordValidator" name="password">
										<input type="password" id="password" pwType="new" /> 
										<label for="confirm">Confirm</label> 
										<input type="password" id="confirm" pwType="verify" />
									</div>
								</td>
							</tr>
							<tr>
								<td colspan="2"><br /><br /></td>
							</tr>
							<tr>
								<td>
									<label for="first">First name</label>
								</td>
								<td>
									<input type="text" id="first" name="first" dojoType="dijit.form.ValidationTextBox" required="true" />
								</td>
							</tr>
							<tr>
								<td>
									<label for="last">Last name</label>
								</td>
								<td>
									<input type="text" id="last" name="last" dojoType="dijit.form.ValidationTextBox" required="true" />
								</td>
							</tr>
							<tr>
								<td>
									<label for="birthdate">Birthdate</label>
								</td>
								<td>
									<input type="text" id="birthdate" name="birthdate" 
									dojoType="dijit.form.DateTextBox" required="true" 
									style="hidden" popupClass="dojox.widget.Calendar"
									/>
								</td>
							</tr>
							<tr>
								<td colspan="2"><br /><br /></td>
							</tr>
							<tr>
								<td>
									<label for="occupation">Occupation</label>
								</td>
								<td>
									<input type="text" id="occupation" name="occupation" dojoType="dijit.form.ValidationTextBox" />
								</td>
							</tr>
							<tr>
								<td>
									<label for="organization">Organization</label>
								</td>
								<td>
									<input type="text" id="organization" name="organization" dojoType="dijit.form.ValidationTextBox" />
								</td>
							</tr>
							<tr>
								<td><br />Captcha Image</td>
								<td>
									<br /><img id="captcha" src="securimage/securimage_show.php" alt="CAPTCHA Image" /><br />
									<a href="#" onclick="document.getElementById('captcha').src = 'securimage/securimage_show.php?'+Math.random();return false">Reload Image</a>
								</td>
							</tr>
							<tr>
								<td><label for="captcha">Captcha Input</label></td>
								<td>
									<input type="text" name="captcha_code" size="10" maxlength="6" dojoType="dijit.form.ValidationTextBox" required="true" />
								</td>
							</tr>
						</table>
						<br /><br />
						<div dojoType="dijit.TitlePane" title="License" open="false">
							<p>Copyright &copy; 2009-2010, Robenie D. Fernandez</p>
							<p>All rights reserved.</p>
							<br />
							<p>
								Redistribution and use in source and binary forms, with or without
								modification, are permitted provided that the following conditions are met:
							</p>
							<ul>
								<li>
									Redistributions of source code must retain the above copyright
									notice, this list of conditions and the following disclaimer.
								</li>
								<li>
									Redistributions in binary form must reproduce the above copyright
									notice, this list of conditions and the following disclaimer in the
									documentation and/or other materials provided with the distribution.
								</li>
								<li>
									Neither the name of the University of the Philippines nor the
									names of its contributors may be used to endorse or promote products
									derived from this software without specific prior written permission.
								</li>
							</ul>
							
							<br />
							<p style="text-align:justify">
								THIS SOFTWARE IS PROVIDED BY ROBENIE D. FERNANDEZ ''AS IS'' AND ANY
								EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
								WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
								DISCLAIMED. IN NO EVENT SHALL Robenie D. Fernandez BE LIABLE FOR ANY
								DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
								(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
								LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
								ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
								(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
								SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
							</p>
						</div>
						<br /><br />
						<p class="center">
							<input type="submit" value="Accept License and Submit" label="Accept License and Submit" dojoType="dijit.form.Button" />
						</p>
						<br />
					</div>
				</form>
				<br /><br />
            </div>
            <div id="ft" style="background-color:#C3D9FF;text-align:center;padding-top:5px;padding-bottom:5px;">
                <p>
                    &copy; 2009-2010 Robenie D. Fernandez and Prof. Rodolfo N. Duldulao Jr.
                </p>
            </div>
        </div>
		<script type="text/javascript" src="lib/dojo/dojo.js" djConfig="parseOnLoad:true"></script>
		<script type="text/javascript">
			dojo.require("dijit.form.Form");
			dojo.require("dijit.form.Button");
			dojo.require("dijit.form.ValidationTextBox");
			dojo.require("dojox.widget.Calendar");
			dojo.require("dijit.form.DateTextBox");
			dojo.require("dojox.form.PasswordValidator");
			dojo.require("dijit.TitlePane");
			dojo.addOnLoad(function(){
				var date = dijit.byId("birthdate");
				var mindate = new Date();
				var maxdate = new Date();
				
				//set valid dates
				mindate.setFullYear(maxdate.getFullYear()-100);
				maxdate.setFullYear(maxdate.getFullYear()-10);
				
				date.constraints.max=mindate;
				date.constraints.max=maxdate;
				date.setValue(maxdate);
			});
		</script>
    </body>
</html>
